google.load("wave", "1");

var ${id};

function initializeWave${id}() {
  var waveframe = document.getElementById( "${id}" );
  var embedOptions = {
    target: waveframe ${options}
  };
  ${id} = new google.wave.WavePanel(embedOptions);
  ${id}.loadWave( "${url}" );
}

google.setOnLoadCallback(initializeWave${id});